package com.toby.ioc.listener;

import com.toby.ioc.config.IocConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.toby.ioc.listener")
public class EventMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(EventMain.class);
        context.publishEvent(new StopEvent(true));
    }
}
